<h1>Editing state</h1>

<% form_for(@state) do |f| %>
  <%= f.error_messages %>

  <p>
    <%= f.label :name %><br />
    <%= f.text_field :name %>
  </p>
  <p>
    <%= f.label :country %><br />
    <%= collection_select(:state, :country_id, @countries, :id, :name) %>
  </p>
  <p>
    <%= f.submit 'Update' %>
  </p>
<% end %>

<%= link_to 'Show', @state %> |
<%= link_to 'Back', states_path %>